package com.zhijian.medical.service;

import com.zhijian.medical.entity.po.TechInstruction;
import com.zhijian.medical.entity.vo.request.TechInstructionSearchVo;
import com.zhijian.medical.entity.vo.request.TechInstructionSaveOrUpdateVo;
import com.zhijian.medical.entity.vo.response.TechInstructionVo;
import com.zhijian.util.page.Page;

import java.util.List;

/**
 * 技术医嘱 业务处理层
 *
 * @author auto
 * @version 1.0
 * @date 2024-11-05 17:17:40
 */
public interface TechInstructionService {

    /**
    * 主键查询
    *
    * @param id
    * @return
    */
    TechInstruction selectById(Long id);

    /**
    * 主键查询vo
    *
    * @param id
    * @return
    */
    TechInstructionVo selectVoById(Long id);

    /**
    * 按照主键删除
    *
    * @param id
    */
    void deleteById(Long id);

    /**
    * 按照主键批量删除
    *
    * @param idList
    */
    void deleteByIdList(List<Long> idList);

    /**
    * 新增
    *
    * @param techInstruction
    * @return
    */
    Long insert(TechInstruction techInstruction);

    /**
    * 动态新增
    *
    * @param techInstruction
    * @return
    */
    Long insertSelective(TechInstruction techInstruction);

    /**
    * 更改
    *
    * @param techInstruction
    * @return
    */
    boolean update(TechInstruction techInstruction);

    /**
    * 动态修改
    *
    * @param record
    * @return
    */
    boolean updateByPrimaryKeySelective(TechInstruction record);

    /**
    * 保存
    *
    * @param saveOrUpdateVo
    * @return
    */
    boolean save(TechInstructionSaveOrUpdateVo saveOrUpdateVo);

    /**
    * 编辑
    *
    * @param saveOrUpdateVo
    * @return
    */
    boolean modify(TechInstructionSaveOrUpdateVo saveOrUpdateVo);

    /**
    * 列表
    *
    * @param techInstructionSearchVo
    * @return
    */
    TechInstructionVo selectOne(TechInstructionSearchVo techInstructionSearchVo);

    /**
    * 总数
    *
    * @param techInstructionSearchVo
    * @return
    */
    Integer count(TechInstructionSearchVo techInstructionSearchVo);

    /**
    * 列表
    *
    * @param techInstructionSearchVo
    * @return
    */
    List<TechInstructionVo> selectList(TechInstructionSearchVo techInstructionSearchVo);

    /**
    * 分页查询
    *
    * @param techInstructionSearchVo
    * @return
    */
    Page<TechInstructionVo> selectPage(TechInstructionSearchVo techInstructionSearchVo);

    /**
    * 批量新增数据（MyBatis原生foreach方法）
    *
    * @param entities 实例对象列表
    * @return 影响行数
    */
    boolean insertBatch(List<TechInstruction> entities);

    /**
    * 动态删除，慎重用此方法！！
    *
    * @param techInstructionSearchVo
    * @return
    */
    void deleteByCondition(TechInstructionSearchVo techInstructionSearchVo);
}